import request from '@/utils/request'

// 获取角色信息
export function findPage(params) {
    return request({
        url: '/role/findPage',
        method: 'GET',
        params
    })
}
// 获取角色信息
export function findList(params) {
    return request({
        url: '/role/findList',
        method: 'GET',
        params
    })
}

// 获取角色资源信息
export function findListByRoleId(params) {
    return request({
        url: '/rolePermission/findListByRoleId',
        method: 'GET',
        params
    })
}

// 保存角色资源信息
export function saveTree(data) {
    return request({
        url: '/rolePermission/save',
        method: 'POST',
        data
    })
}

// 菜单
export function permissionTree(params) {
    return request({
        url: '/role/permissionTree',
        method: 'GET',
        params
    })
}
